package com.hbyj.object;

import java.util.ArrayList;
import java.util.List;

import com.hbyj.hbm.vo.Departments;
import com.hbyj.hbm.vo.Roles;
import com.sun.org.apache.bcel.internal.generic.NEW;

public class RoleDepartmetnList {
	private List<RoleData> listRoles;
	private List<DepartmentData> listDepartments;
	
	public RoleDepartmetnList(){
		
	}
	
	public RoleDepartmetnList(List<Roles> listRoles,List<Departments> listDepartments){
		this.listRoles = new ArrayList<RoleData>();
		this.listDepartments = new ArrayList<DepartmentData>();
		this.fillThisByHiberObj(listRoles, listDepartments);
	}
	
	private void fillThisByHiberObj(List listRoles,List listDepartments){
		for (Object temp : listRoles) {
			Roles roles = (Roles)temp;
			RoleData roleData = new RoleData(roles);
			this.listRoles.add(roleData);
		}
		for (Object temp : listDepartments) {
			Departments departments = (Departments)temp;
			DepartmentData departmentData = new DepartmentData(departments);
			this.listDepartments.add(departmentData);
		}
	}

	public void setListRoles(List<RoleData> listRoles) {
		this.listRoles = listRoles;
	}

	public List<RoleData> getListRoles() {
		return listRoles;
	}

	public void setListDepartments(List<DepartmentData> listDepartments) {
		this.listDepartments = listDepartments;
	}

	public List<DepartmentData> getListDepartments() {
		return listDepartments;
	}
}
